package com.assets.room.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.assets.room.entity.Returns;

import java.util.List;

@Dao
public interface ReturnsDao {

    @Insert
    void insertAllData(Returns returns);

    @Insert
    void insertAllData(List<Returns> returns);

    @Query("SELECT * FROM t_asset_returns")
    List<Returns> getAllData();

    @Query("SELECT * FROM t_asset_returns WHERE asset_number = :asset_number")
    List<Returns> getAllData(String asset_number);


    @Query("SELECT * FROM t_asset_returns WHERE receives_id = :receives_id")
    List<Returns> getAllDataByRID(String receives_id);

    @Query("SELECT * FROM t_asset_returns WHERE is_flag = :is_flag")
    List<Returns> getAllDataByStatus(String is_flag);

    @Query("DELETE FROM t_asset_returns")
    void deleteAllData();

//    @Query("UPDATE FROM t_asset_returns SET ")


}
